import { _decorator, Component, Node, director, resources } from 'cc';
import { EDialog, UIManager } from './UIManager';
const { ccclass, property } = _decorator;

@ccclass('UIGame')
export class UIGame extends Component {
    start() {

    }

    update(deltaTime: number) {

    }
    onReturnStartup() {
        director.pause()//暂停游戏
        director.loadScene("startup") //回到开始界面
    }
    onPauseGame() {
        if (director.isPaused()) {
            director.resume() //恢复游戏
            return
        }
        director.pause()//暂停游戏
    }
    onOpenSetting() {
        UIManager.instance.openDialog(EDialog.UISetting)
    }
    onCloseSetting() {
        UIManager.instance.closeDialog(true)
    }
}


